﻿<UserControl x:Class="Mengsk.ERP.App.ArrvieInDelivery.ArriveInQueryUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="1000">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        
        <Grid Grid.Row="0">
            <Grid.RowDefinitions >
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions >
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="100"/>
            </Grid.ColumnDefinitions>
            
            <TextBlock Grid.Column="0" Grid.Row="0" Text="物流公司:" Margin="3" VerticalAlignment="Center"/>
            <ComboBox Grid.Row="0" Grid.Column="1" Name="cbbDeliveryCompany" Margin="3" >
                <ComboBoxItem>所有</ComboBoxItem>
                <ComboBoxItem>圆通</ComboBoxItem>
                <ComboBoxItem>申通</ComboBoxItem>
                <ComboBoxItem>国通</ComboBoxItem>
                <ComboBoxItem>中通</ComboBoxItem>
                <ComboBoxItem>韵达</ComboBoxItem>
                <ComboBoxItem>顺丰</ComboBoxItem>
                <ComboBoxItem>EMS</ComboBoxItem>
                <ComboBoxItem>天天</ComboBoxItem>
                <ComboBoxItem>优速</ComboBoxItem>
                <ComboBoxItem>邮政</ComboBoxItem>
                <ComboBoxItem>全峰</ComboBoxItem>
                <ComboBoxItem>汇通</ComboBoxItem>
                <ComboBoxItem>宅急送</ComboBoxItem>
                <ComboBox.SelectedIndex>0</ComboBox.SelectedIndex>
            </ComboBox>
            <TextBlock Grid.Row="0" Grid.Column="2" Text="物流编号:" Margin="3" VerticalAlignment="Center"/>
            <TextBox Grid.Row="0" Grid.Column="3" Name="tbDeliveryNumber" Margin="3"/>
            <TextBlock Grid.Row="0" Grid.Column="4" Text="录入时间:" Margin="3" VerticalAlignment="Center"/>
            <DatePicker Grid.Row="0" Grid.Column="5" Name="dpArriveInTime" Margin="3" VerticalAlignment="Center"/>
            <TextBlock Grid.Row="0" Grid.Column="6" Text="用户QQ:" Margin="3" VerticalAlignment="Center"/>
            <TextBox Grid.Row="0" Grid.Column="7" Margin="3" Name="tbComment"/>
            <TextBlock Grid.Row="0" Grid.Column="8" Margin="3" Text="返回原因:" VerticalAlignment="Center"/>
            <ComboBox Grid.Row="0" Grid.Column="9" Margin="3" VerticalAlignment="Center" Name="cbbReason">
                <ComboBoxItem>所有</ComboBoxItem>
                <ComboBoxItem>拒收件返回</ComboBoxItem>
                <ComboBoxItem>退换货</ComboBoxItem>
                <ComboBox.SelectedIndex>0</ComboBox.SelectedIndex>
            </ComboBox>
            <Button Grid.Row="0" Grid.Column="10" Margin="3" Width="60" Content="查询" Name="btnQuery" Click="btnQuery_Click"/>
            
        </Grid>
        
        <TextBlock Name="tbTotal" Grid.Row="1" FontSize="14" VerticalAlignment="Center" Margin="3"/>
        
        <DataGrid Grid.Row="2" AutoGenerateColumns="False" SelectionUnit="CellOrRowHeader" SelectionMode="Extended" Name="dgvData" IsReadOnly="True">
            <DataGrid.Columns>
                <DataGridTextColumn Header="物流公司" Width="Auto" Binding="{Binding DeliveryCompany}"/>
                <DataGridTextColumn Header="物流编号" Width="Auto" Binding="{Binding DeliveryNumber}"/>
                <DataGridTextColumn Header="录入时间" Width="Auto" Binding="{Binding CreateTime, StringFormat=\{0:yyyy-MM-dd HH:mm:ss\}}"/>
                <DataGridTextColumn Header="返回原因" Width="Auto" Binding="{Binding ArriveReason}"/>
                <DataGridTextColumn Header="用户QQ" Width="Auto" Binding="{Binding Comment}"/>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</UserControl>
